using System;
using System.Net;

namespace MiFi {
	/// <summary>
	/// Status information for a MiFi device.
	/// </summary>
	public class MiFiStatus {
		/// <summary>
		/// Maximum charge value.
		/// </summary>
		public static readonly int MAX_CHARGE = 4;

		/// <summary>
		/// Maximum number of WiFi clients.
		/// </summary>
		public static readonly int MAX_CLIENTS = 5;

		/// <summary>
		/// Maximum signal strength value.
		/// </summary>
		public static readonly int MAX_SIGNAL_STRENGTH = 5;

		/// <summary>
		/// True if a 2G or 3G network is currently available.
		/// </summary>
		public bool NetworkFound { get; set; }

		/// <summary>
		/// The name of the network to which the device is currently connected.
		/// </summary>
		/// <remarks>
		/// If a network is not available, this will be either "-" or "No Network Found".
		/// </remarks>
		public string NetworkName { get; set; }

		/// <summary>
		/// The technology used for transmission.
		/// </summary>
		public string NetworkTechnology { get; set; }

		/// <summary>
		/// The device's roaming status.
		/// </summary>
		public RoamingStatus RoamingStatus { get; set; }

		/// <summary>
		/// Received signal strength indication (RSSI).
		/// </summary>
		/// <remarks>
		/// Higher values indicate a stronger signal. The maximum value is indicated by the MAX_SIGNAL_STRENGTH constant.
		/// </remarks>
		public int SignalStrength { get; set; }

		/// <summary>
		/// Connection status.
		/// </summary>
		public ConnectionStatus ConnectionStatus { get; set; }

		/// <summary>
		/// The amount of data that has been transmitted (in megabytes) for the current session.
		/// </summary>
		public double DataTransmitted { get; set; }

		/// <summary>
		/// The amount of data that has been received (in megabytes) for the current session.
		/// </summary>
		public double DataReceived { get; set; }

		/// <summary>
		/// The amount of time for which the current session has been active.
		/// </summary>
		public TimeSpan SessionTime { get; set; }

		/// <summary>
		/// The device's IP address.
		/// </summary>
		public IPAddress IPAddress { get; set; }

		/// <summary>
		/// Mask
		/// </summary>
		public IPAddress Mask { get; set; }

		/// <summary>
		/// Gateway
		/// </summary>
		public IPAddress Gateway { get; set; }

		/// <summary>
		/// DNS
		/// </summary>
		public IPAddress Dns { get; set; }

		/// <summary>
		/// The battery's current charge level.
		/// </summary>
		/// <remarks>
		/// The maximum value (fully charged state) is indicated by the MAX_CHARGE constant.
		/// </remarks>
		public int Charge { get; set; }

		/// <summary>
		/// Battery charging status.
		/// </summary>
		/// <remarks>
		/// True if the battery is charging.
		/// </remarks>
		public bool Charging { get; set; }

		/// <summary>
		/// Total number of WiFi clients connected to the device.
		/// </summary>
		/// <remarks>
		/// The maximum value is indicated by the MAX_CLIENTS constant.
		/// </remarks>
		public int Clients { get; set; }

		/* SPRINT ONLY */

		/// <summary>
		/// Activation status on the network.
		/// </summary>
		/// <remarks>
		/// Currently, this property is only supported on the Sprint network.
		/// </remarks>
		public ActivationStatus ActivationStatus { get; set; }

		/// <summary>
		/// Preferred Roaming list status.
		/// </summary>
		/// <remarks>
		/// Currently, this property is only supported on the Sprint network.
		/// </remarks>
		public PrlUpdateStatus PrlUpdateStatus { get; set; }

		/// <summary>
		/// Firmware update status.
		/// </summary>
		/// <remarks>
		/// Currently, this property is only supported on the Sprint network.
		/// </remarks>
		public FirmwareUpdateStatus FirmwareUpdateStatus { get; set; }

		/// <summary>
		/// Master Subsidy Lock status.
		/// </summary>
		/// <remarks>
		/// True if a valid MSL value is provided. Currently, this property is only supported on the Sprint network.
		/// </remarks>
		public bool MasterSubsidyLock { get; set; }
	}
}